﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StateGrid.MDBservice;

namespace StateGrid.ZCWX
{
    /// <summary>
    ///ZCWX_PM 的摘要说明
    /// </summary>
    public class ZCWX_PM : PM
    {
        /// <summary>
        ///分类编码
        /// </summary>
        public String flbm
        {
            get;
            set;
        }

        /// <summary>
        /// 索引编码
        /// </summary>
        public String sybm
        {
            get;
            set;
        }

        /// <summary>
        /// 馆藏号
        /// </summary>
        public String gch
        {
            get;
            set;
        }

        /// <summary>
        /// 中文篇名
        /// </summary>
        public String zwpm
        {
            get;
            set;
        }

        /// <summary>
        /// 出版单位
        /// </summary>
        public String cbdw
        {
            get;
            set;
        }

        /// <summary>
        /// 文献密级
        /// </summary>
        public String wxmj
        {
            get;
            set;
        }

        /// <summary>
        /// 文献类型
        /// </summary>
        public String wxlx
        {
            get;
            set;
        }

        /// <summary>
        /// 责任个人
        /// </summary>
        public String zrgr
        {
            get;
            set;
        }

        /// <summary>
        /// 责任单位
        /// </summary>
        public String zrdw
        {
            get;
            set;
        }
        
        /// <summary>
        /// 出版日期
        /// </summary>
        public DateTime? cbrq
        {
            get;
            set;
        }

        /// <summary>
        /// 载体形态
        /// </summary>
        public String ztxt
        {
            get;
            set;
        }

        /// <summary>
        /// 国图分类
        /// </summary>
        public String gtfl
        {
            get;
            set;
        }

        /// <summary>
        /// 中文主题词
        /// </summary>
        public String zwztc
        {
            get;
            set;
        }
        
        /// <summary>
        /// 中文文摘
        /// </summary>
        public String zwwz
        {
            get;
            set;
        }

        /// <summary>
        /// 更新日期
        /// </summary>
        public DateTime gxrq
        {
            get;
            set;
        }

        /// <summary>
        /// 备注
        /// </summary>
        public String bz
        {
            get;
            set;
        }

        /// <summary>
        /// 登录人
        /// </summary>
        public String dlr
        {
            get;
            set;
        }

        public ZCWX_PM()
        {
            //
            //TODO: 在此处添加构造函数逻辑
            //
        }
        public override string ToString()
        {
            String ret;
            ret = "[分类编码]" + this.flbm + "[中文篇名]" + this.zwpm + " [责任个人]" + this.zrgr;
            return ret;
        }

        public override string AllContent()
        {
            String ret = "('" + flbm + "','" + sybm + "','" + gch + "','" + zwpm + "','" + cbdw + "','" + wxmj + "','" + wxlx + "','" + zrgr + "','" + zrdw + "','" + cbrq + "','" + ztxt + "','" + gtfl + "','" + zwztc + "','" + zwwz + "','" + bz + "','" + gxrq + "','" + dlr + "')";
            return ret;
        }

        public override void fillEmptyStringAsNull()
        {
            String temp = "NULL";
            if (String.Empty.Equals(this.flbm)) flbm = temp;
            if (String.Empty.Equals(this.sybm)) sybm = temp;
            if (String.Empty.Equals(this.gch)) gch = temp;
            if (String.Empty.Equals(this.zwpm)) zwpm = temp;
            if (String.Empty.Equals(this.cbdw)) cbdw = temp;
            if (String.Empty.Equals(this.wxmj)) wxmj = temp;
            if (String.Empty.Equals(this.wxlx)) wxlx = temp;
            if (String.Empty.Equals(this.zrgr)) zrgr = temp;
            if (String.Empty.Equals(this.zrdw)) zrdw = temp;
            if (String.Empty.Equals(this.ztxt)) ztxt = temp;
            if (String.Empty.Equals(this.gtfl)) gtfl = temp;
            if (String.Empty.Equals(this.zwztc)) zwztc = temp;
            if (String.Empty.Equals(this.zwwz)) zwwz = temp;
            if (String.Empty.Equals(this.bz)) bz = temp;
        }

        public override void eraseNullInEmptyString()
        {
            String temp = "NULL";
            if (temp.Equals(this.flbm)) flbm = String.Empty;
            if (temp.Equals(this.sybm)) sybm = String.Empty;
            if (temp.Equals(this.gch)) gch = String.Empty;
            if (temp.Equals(this.zwpm)) zwpm = String.Empty;
            if (temp.Equals(this.cbdw)) cbdw = String.Empty;
            if (temp.Equals(this.wxmj)) wxmj = String.Empty;
            if (temp.Equals(this.wxlx)) wxlx = String.Empty;
            if (temp.Equals(this.zrgr)) zrgr = String.Empty;
            if (temp.Equals(this.zrdw)) zrdw = String.Empty;
            if (temp.Equals(this.ztxt)) ztxt = String.Empty;
            if (temp.Equals(this.gtfl)) gtfl = String.Empty;
            if (temp.Equals(this.zwztc)) zwztc = String.Empty;
            if (temp.Equals(this.zwwz)) zwwz = String.Empty;
            if (temp.Equals(this.bz)) bz = String.Empty;
        }
    }
}